#include "work1.h"
#include "ui_work1.h"
#include "add_order.h"
#include "search_order.h"
#include "delet_order.h"
#include "mainwindow.h"
#include "main.h"
#include "client_mode.h"
work1::work1(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::work1)
{
    ui->setupUi(this);
}

work1::~work1()
{
    delete ui;
}

void work1::on_pushButton_2_clicked()
{
    if(users==1){
        add_order *add_o;
        add_o = new add_order;
        add_o->show();
    }else{
        client_mode *add_o;
        add_o = new client_mode;
        add_o->show();
    }

}

void work1::on_pushButton_3_clicked()
{
    search_order *search_o;
    search_o = new search_order;
    search_o->show();
}

void work1::on_pushButton_4_clicked()
{
    if(users==1){
        delet_order *delete_o;
        delete_o = new delet_order;
        delete_o->show();
    }else{
        client_mode *add_o;
        add_o = new client_mode;
        add_o->show();
    }
}
